/**
 * @file
 * @author  Tsin Smith <tsin.creator@gmail.com>
 *
 */

#ifndef __TSIN_UTIL_TIMER_HPP__
#define __TSIN_UTIL_TIMER_HPP__

#include <tsin/util/common.hpp>

namespace tsin {

        /**
         * @class Timer
         * @ingroup util
         * @brief Interface for constant-interval timer.
         */
        class UTIL_DLLEXPORT Timer
        {
        public:
                /**
                 * Set framerate by Frame Per Second.
                 *
                 * @param fps Frames per second to be specified.
                 */
                virtual void setFps(int fps) = 0;

                /**
                 * Set framerate by interval between two frames.
                 *
                 * @param msec Milliseconds of the interval.
                 */
                virtual void setInterval(int msec) = 0;

                /**
                 * Carry out a delay for framerate control.
                 */
                virtual void delay() = 0;
        };

}

#endif /* __TSIN_UTIL_TIMER_HPP__ */
